package com.example.fruitdemo.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.fruitdemo.pojo.Cart;
import com.example.fruitdemo.pojo.GoodBuy;
import com.example.fruitdemo.pojo.Order;
import com.example.fruitdemo.pojo.OrderDto;
import com.example.fruitdemo.ruslet.R;

import java.util.List;

public interface OrderService extends IService<Order> {
    //立即支付
    R<String> buynow(Long goodid,Integer number,String signalprice,String authorization);
    //查询购物车内容
    R<Cart> getgoods(String authorization);
    //查询立即购买
    R<Cart> getGoodBuyNow(String authorization);
    //添加到购物车
    R<String> tocart(Long goodid,Integer number,String signalprice,String authorization);

    //删除商品
    R<String> removeGood(String authorization,String goodid);

    //提交订单
    R<String> suborder(OrderDto orderDto);

    //分页查询
    R<Page> getPage(String authorization,int page,int pageSize);
   //根据搜索信息获取订单
   R<Page> pageBymsg(String authorization,int page,int pageSize,String searchmsg);
}
